package com.kc.business.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * TODO
 * 回购商品
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/10/13
 */
@Data
@Table(name = "kc_goods_buyback")
public class BizGoodsBuyback {
    @Id
    private Integer backId;
    /** 商品名称 */
    private String title;
    /** 商品图片 */
    private String thumb;
    /** 图片宽度 */
    private Integer imgWidth;
    /** 图片高度 */
    private Integer imgHeight;
    /** 商品id **/
    @NotNull(message = "商品id不能为空")
    private Integer productId;
    /** 规格id **/
    @NotNull(message = "规格id不能为空")
    private Integer specId;
    /** 回购价格 **/
    @NotNull(message = "回购价格不能为空")
    @Min(0)
    private BigDecimal buybackPrice;
    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 是否删除:1删除，0未删除
     */
    private Integer isDeleted;
}
